package P2P.Server;

import java.io.IOException;
import java.io.Serializable;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.HashMap;

/**
 * Created by Harvin on 2014/6/26 0026.
 */
public class Server {
	private HashMap<String, Client_info> clients = new HashMap<String, Client_info>();

	public static void main(String[] args) {
		while (true) {
			Socket socket = null;
			try {
				ServerSocket ss = new ServerSocket(5555);
				socket	= ss.accept();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}


	}
}

class Client_info {
	private InetAddress ip;
	private int port;
	private InetAddress in_ip;
	private int in_port;

	public Client_info(InetAddress ip, int port,
					   InetAddress in_ip, int in_port) {
		this.ip		= ip;
		this.port	= port;
		this.in_ip	= in_ip;
		this.in_port= in_port;
	}

	public InetAddress getIn_ip() {
		return in_ip;
	}

	public void setIn_ip(InetAddress in_ip) {
		this.in_ip = in_ip;
	}

	public int getIn_port() {
		return in_port;
	}

	public void setIn_port(int in_port) {
		this.in_port = in_port;
	}

	public InetAddress getIp() {
		return ip;
	}

	public void setIp(InetAddress ip) {
		this.ip = ip;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}
}
